package com.zjq.jwt;

/**
 * @author zjq
 * @date 2020/3/12 15:42
 * <p>title:状态码枚举</p>
 * <p>company:zjhcsoft</p>
 * <p>description:</p>
 */
public enum ResponseCode {

    SUCCESS(true,2000,"操作成功！"),
    //---系统错误返回码-----
    FAIL(false,10001,"操作失败"),
    UNAUTHENTICATED(false,5104,"用户未登录(没有获取到token)"),
    UNKNOWN_ERROR(false,5000,"服务器内部出错"),
    UNKNOWN_USER(false,5106,"用户不存在"),
    TOKENTIMEOUT(false,5109,"会话超时（token过期）"),
    MEMBERCODE(false,5300,"验证码错误"),
    ACCOUNTORPASSWORDERROR(false,5108,"账号或密码错误"),
    UNKNOWN_BOOKINGSITE(false,5210 ,"没有找到用户对应的场馆id" );


    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;

    ResponseCode(boolean success, int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    public boolean success() {
        return success;
    }

    public int code() {
        return code;
    }

    public String message() {
        return message;
    }

}